<div id="mcright-wrapper">    
    <div id="top-post" class="cr-wrapper">
        <div class="cr-title">
            <p>top post</p>
        </div>
        <div class="cr-content">
            <ul>
                <?php foreach ($top_post->result() as $row) { ?>
                    <li>
                        <a href="<?php echo base_url() . 'main/view/' . $row->article_id . '/' . url_title($row->title); ?>">
                            <?php echo $row->title; ?>
                        </a>
                    </li>
                <?php } ?>
            </ul>
        </div>
    </div>
    <div id="portfolio" class="cr-wrapper">
        <div class="cr-title">
            <p>last portfolio</p>
        </div>
        <div class="cr-content">
            <ul>
                <?php foreach ($portfolio->result() as $row) { ?>
                    <li>
                        <a href="<?php echo base_url() . 'main/view/' . $row->article_id . '/' . url_title($row->title); ?>">
                            <?php echo $row->title; ?>
                        </a>
                    </li>
                <?php } ?>
            </ul>
        </div>
    </div>
</div>